import { getTabList, reqFindBanner } from '@/api/home'

export default {
  namespaced: true,
  state () {
    return {
      list: [],
      bannerList: []
    }
  },
  mutations: {
    setList (state, list) {
      state.list = list
    },
    setBannerList (state, bannerList) {
      state.bannerList = bannerList
    }
  },
  actions: {
    async getList ({ commit }) {
      const res = await getTabList()
      const ress = await reqFindBanner()
      commit('setList', res.result)
      commit('setBannerList', ress.result)
    },

    async getBannerList ({ commit }) {

    }
  }
}
